# encoding:utf-8

import random

import pygame
from pygame.sprite import Sprite

class Food(Sprite):
    """-----食物-----"""
    def __init__(self,screen):
        super().__init__()
        self.screen = screen
        self.rect = pygame.Rect(0,0,10,10)
        #max_xy = self.screen.width -10
        x = random.randint(0,790)
        y = random.randint(0,790)
        self.rect.x = x
        self.rect.y = y
        self.color = (255,125,125)

    def showme(self):
        pygame.draw.rect(self.screen,self.color,self.rect)
